import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
    //1、用于更新数据
    state: {
        userInfo: {}
    },
    //用于存储数据
    mutations: {
        updateData(state, newData) {
            state.userInfo = newData
        }
    },
    actions: {},
    modules: {}
})